package com.quick.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.quick.base.KeyValue;
import com.quick.base.Page;
import com.quick.base.Search;
import com.quick.sys.domain.dto.SysDictDTO;
import com.quick.sys.domain.pojo.SysDict;
import com.quick.sys.domain.search.SysDictSearch;
import com.quick.sys.domain.vo.SysDictVo;
import com.quick.util.QuickTool;

public interface ISysDictService {
	default void queryWrapper(QueryWrapper<SysDict>queryWrapper, SysDictSearch search) {
		if(QuickTool.notNull(search.getKey())){
			queryWrapper.lambda().like(SysDict::getDictType, search.getKey());
		}
	}
	Boolean saveDict(SysDictDTO dict);

	Page<SysDictVo> searchDict(Search<SysDictSearch> search);

	SysDictVo queryDict(Integer id);

	Boolean delDict(Integer id);

	Map<String, List<KeyValue>> all();

}
